package com.entity;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the PROCESS_ database table.
 * 
 */
@Entity
@Table(name="PROCESS_")
@NamedQuery(name="Process.findAll", query="SELECT p FROM Process p")
public class Process implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="PROCESS__PROCESSID_GENERATOR", sequenceName="SEQ",initialValue=1,allocationSize=1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="PROCESS__PROCESSID_GENERATOR")
	@Column(name="PROCESS_ID")
	private long processId;

	@Temporal(TemporalType.DATE)
	@Column(name="PROCESS_EXPECTDATE")
	private Date processExpectdate;

	@Temporal(TemporalType.DATE)
	@Column(name="PROCESS_FINISHDATE")
	private Date processFinishdate;

	@Temporal(TemporalType.DATE)
	@Column(name="PROCESS_FINISHTIME")
	private Date processFinishtime;

	@Column(name="PROCESS_IFDELETE")
	private BigDecimal processIfdelete;

	@Temporal(TemporalType.DATE)
	@Column(name="PROCESS_INTODATE")
	private Date processIntodate;

	@Column(name="PROCESS_REMARK")
	private String processRemark;

	@Column(name="PROCESS_STAFF")
	private String processStaff;

	@Temporal(TemporalType.DATE)
	@Column(name="PROCESS_STARTDATE")
	private Date processStartdate;

	@Temporal(TemporalType.DATE)
	@Column(name="PROCESS_STARTTIME")
	private Date processStarttime;

	@Column(name="PROCESS_STATE")
	private String processState;

	//bi-directional many-to-one association to Repairorder
	@OneToOne
	@JoinColumn(name="REPAIRORDER_ID")
	@JSONField(serialize=false)
	private Repairorder repairorder;
	
	//bi-directional many-to-one association to User
	@ManyToOne
	@JoinColumn(name="USER_ID")
	private User user;

	//用户id
	@Transient
	private Long userId;
	//维修工单id
	@Transient
	private Long repairorderId;
	
	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public Long getRepairorderId() {
		return repairorderId;
	}

	public void setRepairorderId(Long repairorderId) {
		this.repairorderId = repairorderId;
	}

	public Process() {
	}

	public long getProcessId() {
		return this.processId;
	}

	public void setProcessId(long processId) {
		this.processId = processId;
	}

	public Date getProcessExpectdate() {
		return this.processExpectdate;
	}

	public void setProcessExpectdate(Date processExpectdate) {
		this.processExpectdate = processExpectdate;
	}

	public Date getProcessFinishdate() {
		return this.processFinishdate;
	}

	public void setProcessFinishdate(Date processFinishdate) {
		this.processFinishdate = processFinishdate;
	}

	public Date getProcessFinishtime() {
		return this.processFinishtime;
	}

	public void setProcessFinishtime(Date processFinishtime) {
		this.processFinishtime = processFinishtime;
	}

	public BigDecimal getProcessIfdelete() {
		return this.processIfdelete;
	}

	public void setProcessIfdelete(BigDecimal processIfdelete) {
		this.processIfdelete = processIfdelete;
	}

	public Date getProcessIntodate() {
		return this.processIntodate;
	}

	public void setProcessIntodate(Date processIntodate) {
		this.processIntodate = processIntodate;
	}

	public String getProcessRemark() {
		return this.processRemark;
	}

	public void setProcessRemark(String processRemark) {
		this.processRemark = processRemark;
	}

	public String getProcessStaff() {
		return this.processStaff;
	}

	public void setProcessStaff(String processStaff) {
		this.processStaff = processStaff;
	}

	public Date getProcessStartdate() {
		return this.processStartdate;
	}

	public void setProcessStartdate(Date processStartdate) {
		this.processStartdate = processStartdate;
	}

	public Date getProcessStarttime() {
		return this.processStarttime;
	}

	public void setProcessStarttime(Date processStarttime) {
		this.processStarttime = processStarttime;
	}

	public String getProcessState() {
		return this.processState;
	}

	public void setProcessState(String processState) {
		this.processState = processState;
	}

	public Repairorder getRepairorder() {
		return this.repairorder;
	}

	public void setRepairorder(Repairorder repairorder) {
		this.repairorder = repairorder;
	}

	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}

}